lib/pull: [scan-build] Silence a dead store warning
authorColin Walters <walters@verbum.org>
Fri, 18 Oct 2019 14:48:25 +0000 (14:48 +0000)
committerColin Walters <walters@verbum.org>
Fri, 18 Oct 2019 15:07:39 +0000 (15:07 +0000)
This one was actual duplicate code.

src/libostree/ostree-repo-pull.c

index ba6e72891e55a02f9da27d69bb724d98ebd44d51..bcb8b42033d67c1625fb546e2f27c2bfa06ef86d 100644 (file)
@@ -2181,7 +2181,6 @@ static void
 start_fetch (OtPullData *pull_data,
              FetchObjectData *fetch)
 {
-  gboolean is_meta;
   g_autofree char *obj_subpath = NULL;
   guint64 *expected_max_size_p;
   guint64 expected_max_size;
@@ -2190,13 +2189,12 @@ start_fetch (OtPullData *pull_data,
   GPtrArray *mirrorlist = NULL;
 
   ostree_object_name_deserialize (fetch->object, &expected_checksum, &objtype);
-  is_meta = OSTREE_OBJECT_TYPE_IS_META (objtype);
 
   g_debug ("starting fetch of %s.%s%s", expected_checksum,
            ostree_object_type_to_string (objtype),
            fetch->is_detached_meta ? " (detached)" : "");
 
-  is_meta = OSTREE_OBJECT_TYPE_IS_META (objtype);
+  gboolean is_meta = OSTREE_OBJECT_TYPE_IS_META (objtype);
   if (is_meta)
     pull_data->n_outstanding_metadata_fetches++;
   else